bitkeeper revision 1.1159.40.1 (41238b0aeIY1yNNg2yYui_jKDRtRPA)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Wed, 18 Aug 2004 16:59:54 +0000 (16:59 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Wed, 18 Aug 2004 16:59:54 +0000 (16:59 +0000)
dom_mem_ops fixup

linux-2.6.7-xen-sparse/drivers/xen/netfront/netfront.c
xen/common/dom_mem_ops.c

index 118577ef3eaf694624bea6941078df1ce7ecc7a2..176cd90dc3351489fdc8362ef3e4b53256cb2988 100644 (file)
@@ -285,7 +285,7 @@ static void network_alloc_rx_buffers(struct net_device *dev)
     rx_mcl[nr_pfns].args[0] = MEMOP_decrease_reservation;
     rx_mcl[nr_pfns].args[1] = (unsigned long)rx_pfn_array;
     rx_mcl[nr_pfns].args[2] = (unsigned long)nr_pfns;
-    rx_mcl[nr_pfns].args[3] = 0;
+    rx_mcl[nr_pfns].args[3] = DOMID_SELF;
 
     /* Zap PTEs and give away pages in one big multicall. */
     (void)HYPERVISOR_multicall(rx_mcl, nr_pfns+1);
index e364a46a68d2f4f83450804cd2e2fda25621fcf3..1f61c240fa39c929a3acd9dd861afab92e9b6da5 100644 (file)
@@ -98,7 +98,7 @@ long do_dom_mem_op(unsigned int   op,
     struct domain *d;
     long           rc;
 
-    d = (domid == DOMID_SELF) ? current : find_domain_by_id(domid);
+    d = ( (domid == DOMID_SELF) || (!IS_PRIV(current)) ) ? current : find_domain_by_id(domid);
     if ( d == NULL )
        return -ESRCH;